Fixing db datatypes