fix offset calc if scrolled