Fix previous and next post link function