fixed a number of small bugs in conversion tools