Fixed 'undefined' error in touchLayer when running on desktop.