Fix: drawing rectangles bug