more forgiving theme injection function