fixed xy problem when drawing rectangles, only finds white rectangles not black ones