fix infer and upate the document.