Fix gestures when switching top view controllers