Fix contract.

First bug caught with new test.  Thanks Robby!