added the suport for pagination offsets on the modals