bug fix in createRectangle and createCircle