fixed crash in solve_right