diff --git a/apps/app_dial.c b/apps/app_dial.c
index 1e5d95f3bd9487655f6bfb967c8ad6ffe0bc63fa..0c155a9078a4d0030fdeb2b25a5bd7e84333845e 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -867,7 +867,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 			ast_set2_flag(peerflags, strchr(transfer, 'w'), DIAL_MONITOR_IN);	
 			ast_set2_flag(peerflags, strchr(transfer, 'W'), DIAL_MONITOR_OUT);	
 			ast_set2_flag(peerflags, strchr(transfer, 'd'), DIAL_HALT_ON_DTMF);	
-			ast_set2_flag(tmp, strchr(transfer, 'g'), DIAL_GO_ON);	
+			ast_set2_flag(peerflags, strchr(transfer, 'g'), DIAL_GO_ON);	
 		}
 		strncpy(numsubst, number, sizeof(numsubst)-1);
 		/* If we're dialing by extension, look at the extension to know what to dial */