Fix header corruption