fix issue with swipe going out of bounds, polish as well