fixed up touch handler