Fixed theme toggling issue on Firefox and IE