Map fixes.

- Fixed #3344.
- Fixed #3381.