Fixed bug where I did not distribute the problem properly