fixed a bug that PageManager.popToClasses() did not work as expected.