fixed recursion limitation