diff --git a/apps/app_while.c b/apps/app_while.c
index 7af5f31c04bbc6aa25eb76f32a8435203f8dc516..ea0fd4986f6b98872a5310ee2a1a43e84881c2d0 100644
--- a/apps/app_while.c
+++ b/apps/app_while.c
@@ -277,7 +277,7 @@ static int _while_exec(struct ast_channel *chan, void *data, int end)
 	}
 	
 
-	if ((!end && !pbx_check_condition(condition)) || (end == 2)) {
+	if ((!end && !pbx_checkcondition((char *) condition)) || (end == 2)) {
 		/* Condition Met (clean up helper vars) */
 		const char *goto_str;
 		pbx_builtin_setvar_helper(chan, varname, NULL);