Fix handling of closed-page mode.