Fixes weirdness with ternary op logic.