date compare fix