Rectangles resizing properly