Fixed a crashing bug due to the gesture recognizer dependency