fixed syntax error in ternary