Fix another centroid problem.

Also fixes the third argument for rotation angle.