deal with invalid date ranges (bug 924539)