fixed bug in conversion script