fix date bug