fixed TypeError and working on scrolling touch event