Fixed bug on swipe gestures