page controller and fix flash change page