correcting datatype errors