fix date bugs