Theme fix

See commit messages for further info.

fixes #1770 
fixes #1772