Fix header parsing