fixed character movement bug, where sometimes touchended was not recognised