Improve page switching