Index: apps/app_while.c =================================================================== --- apps/app_while.c (revision 51363) +++ apps/app_while.c (working copy) @@ -275,8 +275,8 @@ pbx_builtin_setvar_helper(chan, my_name, NULL); snprintf(end_varname,VAR_SIZE,"END_%s",varname); if ((goto_str=pbx_builtin_getvar_helper(chan, end_varname))) { + ast_parseable_goto(chan, goto_str); pbx_builtin_setvar_helper(chan, end_varname, NULL); - ast_parseable_goto(chan, goto_str); } else { int pri = find_matching_endwhile(chan); if (pri > 0) {