fixes to generate_map
Updated generate map