I would replace the plastic sights with metal ones. Glock sights tend to break. I have seen lots of new shooters shoot low and to the left with 17s and 19s, it was due to the grip. Heck, even rookie LEOs have this problem. Also, some students anticipate the snappy 9mm of the polymer gun before it fires. The result is dropping the gun low and to the left. Not saying these incidents relate to you, but these are the main causes. If I was a Glock fan, I would have switched to a G23 and stick with a .40.
Oh, the reason the military went with a Beretta was for financial reasons, and stayed with a 9mm because it is a NATO round. They should have chosen the HK45, which was designed for that specific military testing. I know troops and airmen that brought their own guns to recent conflicts to include Glocks. Navy is going back to .45, as well as SpecOps.