fix bugs. added collected pages counter.