Fix in map function