Fix plain text stored to HTML

Fixes most of issue #148