Fixed isSolved() method