Only stop if solution is found