Fixing the stack level too deep error. Closes #11