fix swipe bug