Fix broken API tests