Fix getting posts for paginator