Fix undefined map error