handle header overlapping circular buffer
preserve header info