Fixed a bug in the rendering of rectangles