Correction of toHtml. Now works !

Might be some corner cases, but who cares?