Fixed api tests