Fixing invalid date parsing errors