Fix warning with logical operators