fixed edge cases involving loading the dataset in the middle and scrolling to the top. TODO fix edge cases for reaching end of dataset