Fixed major bug where search wasn't terminating at victory states