Fixed autopaging and tests