fix issue with sorting when scrolled down