fix wrong usage of map