Index: mail/mail-stub-exchange.c
===================================================================
--- mail/mail-stub-exchange.c	(revision 1887)
+++ mail/mail-stub-exchange.c	(working copy)
@@ -402,6 +402,8 @@ message_removed (MailStub *stub, MailStu
 	MailStubExchangeMessage *mmsg;
 	guint index;
 
+	g_return_if_fail (href != NULL);
+
 	mmsg = g_hash_table_lookup (mfld->messages_by_href, href);
 	if (!mmsg)
 		return;
@@ -548,7 +550,14 @@ static void
 got_folder_error (MailStubExchangeFolder *mfld, const char *error)
 {
 	mail_stub_return_error (MAIL_STUB (mfld->mse), error);
-	free_folder (mfld);
+	printf ("%s: '%s' on %p; ", __FUNCTION__, error?error:"[null]", mfld);
+	if (mfld->mse && mfld->name && g_hash_table_lookup (mfld->mse->folders_by_name, mfld->name) == mfld) {
+		printf ("known\n");
+		/* g_hash_table_remove (mfld->mse->folders_by_name, mfld->name); */
+	} else {
+		printf ("UNknown\n");
+		/* free_folder (mfld); */
+	}
 }
 
 static const char *open_folder_sync_props[] = {
@@ -1212,6 +1221,9 @@ sync_deletions (MailStubExchange *mse, M
 	if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status))
 		g_warning ("synced_deleted: %d", status);
 
+	if (highest_unverified_index > -1)
+		highest_unverified_index = MIN (highest_unverified_index, mfld->messages->len - 1);
+
 	/* Clear out the remaining messages in mfld */
 	while (highest_unverified_index > -1) {
 		mfld->deleted_count++;
