MainFragment and MainLayout fixes