diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index cdfc57ebf76be9c57ef57a0a959b1ed1206bc397..058feaebfd969660f650ff18540523309faae143 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3412,10 +3412,11 @@ static int vm_execmain(struct ast_channel *chan, void *data)
 			skipuser++;
 		else
 			valid = 0;
-
 	}
 
-	res = vm_authenticate(chan, vms.username, sizeof(vms.username), &vmus, context, prefixstr, skipuser, maxlogins);
+	if (!valid) {
+		res = vm_authenticate(chan, vms.username, sizeof(vms.username), &vmus, context, prefixstr, skipuser, maxlogins);
+	}
 
 	if (!res) {
 		valid = 1;