Fixed stack overflow due to recursion.
Merge pull request #37 from FurryFuttock/master

Fixed stack overflow due to recursion.