Added detection for last or first articles.