Fix bug in map