fixing the theme switching on frontend