Fixes bug in HTML printing, closes issue #20