Fix tap recognition bug