Fixed bug with getRectangles() where it would find each rectangle, but
they weren't being added to the list of rectangles to return.