Fixed bug in centerOrigin()