corrects the date locale bug and more