Fixed recursion error (I think)