api tests fixes