Changes to match new Rect API

These changes should work with the rect API changes I made.