line touch detection fixed