Fix switching themes, fix compatibility with 4.4. Fixes #24