fix bug on touch devices