Fixed a bug in the way rectangles are drawn.