added more theme checking