corrects the data types of some fields