fix date errors