Fix next/previous links on diary pages properly