Added some changes to pagecapture.