surround this with `if (pageBuilder.isEmpty)`, otherwise you can produce empty pages.