fixed the drawrectangles