fix translate logic for map