Correct calculating of page size