improve paging, fixes #126;