fix bugs on gesturing