Eliminate possible problems when using UNDEFINED_DATE