fixed issues on the map generation
fixed issues with Map.m