fix error message and typos