small bugfixes to pagesize and offset