remove wrong logic operation