Fixed a bug in setTheme function