Minor tweaks to solve()