Fixed maximal rectangle bug

Returning rectangles with a width or height of 0