Fix #123 infinite loop with the prev/next navigation