diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 8098fe64ac5c60f18a3e2049716889a4f12f23a5..c0c3d06ec4dc39b3f1e698ca34ee246304ed90cb 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3440,7 +3440,11 @@ static int vm_box_exists(struct ast_channel *chan, void *data) {
 		box = context;
 		context = "default";
 	}
-
+	while(*box) {
+		if ((*box != 'u') && (*box != 's') && (*box != 'b'))
+			break;
+		box++;
+	}
 	ast_mutex_lock(&vmlock);
 	user = users;
 	while (user) {
@@ -3448,6 +3452,7 @@ static int vm_box_exists(struct ast_channel *chan, void *data) {
 			branch = 1;
 			break;
 		}
+		user = user->next;
 	}
 	ast_mutex_unlock(&vmlock);