Fix a few small bugs with gestures