Add auto change page and fix bugs