get theme detection working properly