Fixed recursion problem