Fixed issue with no post data when there is only one page of posts