Fixes stack overflow
Merge pull request #2 from DarthMike/fix_stackoverflow

Fixes stack overflow