sophia: fix page size calculation