fix some possible data errors