Changed a map iterator to a pointer to pair.