fixed some swipe related bug