Better handling of gestures