Fix crashes when PAGER quits