fix for datatype conversion