Changes to match new Rect API

These changes should work the Rect API changes.