Fix recursion issue