Fixed syntax error in ternary operation