Fix ternary assignment