recursion error fixed