complete the touchend bug fix