fix wrong usage of map
Merge pull request #1228 from joshuastray/fix-wrong-usage-of-map

fix wrong usage of map