Fix failing tests to be compatible with new api