fix some bugs when generating nitdoc