Fixed broken ternary expression