[#78] Fix bug in solve.cpp