Fix broken api tests