Write `0` for no right page instead of `null`.

Closes #160.