fixed bug in Rectangle class for reseting topleft corner