Changed the way theme is initialized.