fix wrongful placing of rectangles (x and y should be the center, not the top left)