Fix API tests