fix touch detection

fixes #5