fix Pager.detach

detaching the pager would result in the pager not working anymore.
Merge pull request #3685 from minrk/pager

fix Pager.detach

detaching the pager would result in the pager not working anymore.