fix header clearing