fixed some bugs on data_conversion.py