fixed infinite recursion error