diff --git a/pbx.c b/pbx.c
index 4af22c28f7f469a1df6596f73c54a49f53372bb7..6f05528c58ab263636a49838db5b122a411bf281 100755
--- a/pbx.c
+++ b/pbx.c
@@ -893,6 +893,7 @@ static void pbx_substitute_variables_temp(struct ast_channel *c,const char *var,
 						strncpy(workspace, *ret, workspacelen - 1);
 						*ret = workspace;
 					}
+					break;
 				}
 			}
 		}