Fixing types according to the new db layout