Fix touch event detection