Fixed calling custom functions on touch devices