Added automatic search for the main theme