fix headers and footers