Fixed bug in to_html
Fixed bug in to_html