fixed bug: can draw from any direction to get the rectangle