fix api tests