Fixed broken tests in API