fix recursion depth: all algorithms