Fixing up the swipe gestures