fix error; add some doc.