Fix doc generator bugs when generating interface docs