fix date Undefined