fixed ternary operator