fix swipe gesture handling