Remove wrongly placed NOT operators