(minor) Fix bug when rectangle extends beyond left boundary