Fixed a glitch

the second constructor doesn't identify the object type, so width and height of rectangles always becomes 0