fix an error in printhtml