changed date handling for empty dates