fix bad boolean ocndition in warning