Communism was never realized and what didn't work was the transitions stage between free market capitalism and communism, state capitalism. In literally every instance of communism not working, it was state capitalism that didn't work because the people who benefited from state capitalism worked to keep it in place as communism would have ended their greedy consolidation of power. This is not a flaw in communism, this is a flaw in capitalism: the inevitable hoarding of capital.