fix bug when there is no date header