Fixed bug in MakeMap