Just a general note, but the way the program reads stuff is that the most recent page is read first, if the conditions for it are met. So you want to put your switch based pages later on, rather than the start.
Since your conditions on page 2 or 3 were met, while also the condition on page 1, the program was reading pages 2/3 as the are more recent pages.