remove a useless ternary condition