It would be naive to think that the problems plaguing mankind today can be solved with means and methods which were applied or seemed to work in the past.
The market came with the dawn of civilization and it is not an invention of capitalism. If it leads to improving the well-being of the people there is no contradiction with socialism.