Added ability to change page size at runtime