Fixed more bugs

Prevented user from manually adding invalid rectangles or points
Fixed bug in bug fixing