fixing the boolean operator