Fix some gesture detection for scrolling