minor changes for pagination.