api tests bugfix