Fixed bug which occurred if the next entry in a list was accessed if no
next entry existed