Fix a race in pondering mode