Improved touch event handling