Fixing swipe direction detection