Remove strange use of the ternary operator