Fix an issue that Gesture Detector cannot find the correct directory