Pages width check

See the full commit message in the first commit for details.