Working on the longe or at liberty and making sure you are riding correctly can be augmented by a third--and critical--exercise...the flex.
At first, you horse may try to get away from this exercise by turning its haunches away and spinning in a circle. It is important that you do not fuss about this: simple follow all your horse's movements. Do not be worried about getting kicked: when your horse's head is turned toward you, he is a bit off balance and will be reluctant to kick from this angle. Mostly, he will be just trying to figure out what it is you want. (Caution: if your horse is a kicker, do get help with this exercise from an expert who can work with you and your horse in person.)