Fixed bug in solution check.