Changed to use the ternary operator.