Fix next, which was nil
Merge pull request #158 from Xandaros/next

Fix next, which was nil