Repaired a bug when dumping to HTML doc