Fix for singularities in solve().