fix bug in attachTouch