fix header in the middle of code bug