The formula used by Soviet propaganda to define and portray relations between the Soviet nations was "The friendship of peoples". But regarding relations between the regime and the population, officialdom appeared to consider some nations friendlier to the state than others. In the years leading up to the outbreak of WW2, Stalin prepared his country for possible foreign invasion and cleared the front lines of potential traitors. Ethnicity rather than class bcame the new criteria of traitor. If the Russians had been deemed model citizens, then non-Russians with traditional homelands or significant diasporas outside the USSR were seen as potential traitors and were targeted in a number of repressive operations that culminated in the Great Terror. First on the list were Soviet citizens of German, Polish and Japanese origin as well as nationally conscious Ukrainians. Between August 1937 and November 1938, the Soviet regime sentenced more than 335,000 people who had been arrested as part of the "nationality operations", 73% were executed. By 1939, the USSR had long ceased to regard Ukrainians living in Poland as a bridgehead to promoting world revolution, but with the rise of Germany treated them as well as Ukrainians living in the USSR as a potential threat to the USSR in the event of a German invasion. After the German dismantlement of Czechoslovakia in 1939, its eastern region declared independence as Transcarpathian Ukraine. This set a strong precedent for Stalin, who wanted no more Ukrainian enclaves outside of the USSR which could function as possible bridgeways for a future invasion. On August 24, the Soviet foreign minister Viacheslav Molotov signed a non-aggression treaty with the German foreign minister Joachim von Ribbentrop, with photos showing a joyful Stalin the foreground. In order to prepare for and consolidate his annexations, Stalin made concessions to nationality discourse and policy. The rehabilitation of the traditional Ukrainian historical narrative began a few years before the start of WW2 in preparation for the war and as part of the rehabilitated Russian imperial narrative. Only those parts of the Ukrainian narrative that fitted pre-revolutionary imperial narrative were selected for inclusion and were often highly distorted. The key symbol of the new treatment was Hetman Bohdan Khmelnytsky, who had been denounced in Soviet literature of the mid 1930s. Khmelnytsky's controversial position from both a socialist persecutionary and a Ukrainian nationalist perspective meant his rehabilitation began in Moscow, not in Kyiv, and was undertaken at the highest level. By the summer of 1940, concessions to Ukrainian cultural policy once again became taboo, Mykhailo Marchenko, who had been appointed the new president of the Lviv University after being transported in from Kyiv out of suspicion of the local Ukrainian intelligentsia, was removed from his position and arrested in June 1941 on charges of maintaining ties with the Ukrainian nationalist underground.