Made the same changes to Map as previously done for Set.