Made homepage selection more robust and added dependency on homepage migration.