Fixed recursion issue