Added better support for touch events