Working on fixing page switching issues