Bugfixes on pageselection