Fix main pages and their layouts