fix logical not error