bugfix in header generation