Bug fix in map