corrected touch handling