You are letting your back come out of extension, and letting the bar lose contact with your legs late in the rep. Open your knees up a little and really think about pushing your belly down between your thighs. Keep the bar pulled in tight to your legs the whole way up. It should scrunch your shorts a little bit.