fix api error from upgrade