Added check for not solvable