fix swipe past end problem