Html css js bugfixes

**Resolves issues #803 and #807.**