Fix error of the switcher of pages