fix #96: improve touch events logic