fixed bug with hasTouch definition coming too late