fix gesture bug