Fix bug with no next node
Merge pull request #5 from zdenal/master

Fix bug with no next node