fix date crash