Fix handleGestureChange

Hi, here is the pull request of the fix.