Fixed a bug in the docgen code.