bug fixed

getNextEntry now handles the situation of deletion