Fix and simplify pager