Added setOriginToMiddle