Fix bug in generatedocs