fixed error in determining if a task is overdue