fix date variables' bug