fix test releated to API bugs