fix for paging, related issue #34