fix bug: wrong offset because of scrolling.