bug in drawRectangle fixed