fixed bug in touchUp method