fixing some edge cases for the next/previous article