Fix ternary operation

As it was, it would always return true.