fixes date validation issue