bug fix in gesture recording