Added some corrections for handling touch devices