Remove unnecessary returns in the solutions of the second problems