fixed some conversion errors and typos