Fixed a bug in when the tap button is pressed