Repair next/prev data