Fix for bug in automatic closing of the pager.