Seven,

Like GDA said- more overhead squats.

Also- broomstick overheads for form, shoulder dislocates with a band, and more upper back work. There are couple of things that could be going on- if your squatting technique is more PL style with a hip break first, then you're gonna bend forward too much and lose the bar forward. OH squats need the same technique as an oly squat or front squat- simultaneous hip and knee break, and letting the hips open on the bottom. Second, if your upper back is weak, you're gonna have trouble stabilizing the weight with scapular retraction and depression and thoracic extension. Maybe start from the rack for your overhead squats, push-pressing behind the neck, so you can make sure you've got your chest up at the beginning, and try a fat man pullup or two to check if your upper back (lower traps and rhomboids) is up to speed, as that may be a weak link.

Andrew