fix document and error message