date interval error fix