Fix bug with touch devices