corrected touch detection