scrollToPos bug fix