fixed origin being set to wrong location