fix web ui fatal errors

Fixes #611 #614 #613 
:+1: to all the changes here -- sorry, that PR was getting a bit haphazard towards the end. :tired_face: