fix recursion