attempt at pagination fix