BUG previous and next links not working properly.