PgnTrainer made more robust (works around stockfish bugs)