Fix header generation a bit