fixed issue with next posts and prev posts to sort correctly