Fixed bug when trying to scroll to bottom