Fixing date errors