fix roundOrigin method