Theme fix

See commit messages for further info.

fixes #1770