fixes header and footer templates