Fix date_end issue