Fixed centering of resized rectangle.