Fix all tests for new api