fix bug where scroll to top didnt work properly