Fixed recursion error on Linux