API tests fixes