Possible fix for map_init and map_insert