Fixed Gesture code to work properly with touch devices.