Replace leftover call to rest.chain with rest.wrap