Improving detectiong of swipe gesture