fix some bug in Solver