Fixed runAlgorithm wrapper