since offsetTop is already subtracted out in maxTop it was getting doubled causing elements to pop to sticky position early