Check .Prev and .Next pointers before using it
Merge pull request #50 from cabello/patch-2

Check .Prev and .Next pointers before using it