Add handling for map ownership