Recursion error corrected