fix up next and prev links