fix header merging