Improving handling of map_size