Fixing bug when custom 'theme', 'custom_theme_widget' and 'ajax' options are used together