Fixed so when setting cursor in text, the location is set to the correct format