Use adminpage instead of pagenow.
Merge pull request #177 from Vocativ/custom-post-fix

Use adminpage instead of pagenow.