Avoid crash
Fix multi-page-size mode
Standardize method name
Call setNeedsLayout instead of calling layoutPages directly