fixes crash bug relating to gestures