Fix ternary operator syntax