#554: fixing bug in solve