Fix a bug in the header generation