first fix for addRectangle method