add gesture recognizer delegate method to fix issue #40