added clamps to Rect