diff --git a/main/pbx.c b/main/pbx.c
index ac88d5a01a756a86c623f77c07d32e411c50a04f..2a0f21d77e48aa9efa2cd059a0a075ddff682bff 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -741,7 +741,9 @@ static int _extension_match_core(const char *pattern, const char *data, enum ext
 {
 	mode &= E_MATCH_MASK;	/* only consider the relevant bits */
 
-	if (mode == E_MATCH && pattern[0] == '_' && strcasecmp(pattern,data)==0) /* note: if this test is left out, then _x. will not match _x. !!! */
+	if ( (mode == E_MATCH)
+		&& (pattern[0] == '_') 
+		&& (strcasecmp(pattern,data)==0) ) /* note: if this test is left out, then _x. will not match _x. !!! */
 		return 1;
 
 	if (pattern[0] != '_') { /* not a pattern, try exact or partial match */