Fix AssertionError on /contract