Made ternary map work again.

Fix ternary map.