error fix for existing theme switching