Modified handling of MainFragment