I've seen this happen to too many people when they first get a .40 to think its the GLOCK hardware first. The .40 has some recoil to it, and shooters will grip tighter than they may have been use to with the 9mm models, and either push up on the slide release lever (causing exactly your problem) or ride it with their thumb (causing the slide to NOT lock back after the last round). Try using a thumbs-locked-down grip to see if it cures your problem temporarily. Then experiment till you find a grip that works.