Fix ternary operator