fix switch pages