fix bug when no start or end date is specified