fixed the close gesture