important fix in conversion function