fix bug in scrollIntoView