Fix issue when creating an invalid ITokenProvider