fixed issues with previous and next post