fix bug and add gesture