Improve swipe detection