During the First Republic, the KPÖ had little influence and failed to gain a single mandate in parliament, in part because of the ability of the Social Democratic Party (SPÖ) to unite the workers as an opposition movement. The party was also seriously weakened by internal factional struggles. In parallel with the ascent of Joseph Stalin to General Secretary in the Soviet Union in the early 1920s, the KPÖ was also refashioned in accordance with the principles of democratic centralism, and party discipline was more strictly enforced. Due to these reforms, the party was able to overcome its factional struggles by the late-1920s.