Fix a bug that made the main loop infinite when using interesting candidates