Fix main_locations recursion