Improved hiding and showing of the pager