fix bug when no solution