diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 6d16575..ee278e8 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1265,17 +1265,19 @@ imapx_untagged (CamelIMAPXServer *is,
 
 		if ((finfo->got & FETCH_FLAGS) && !(finfo->got & FETCH_HEADER)) {
 			CamelIMAPXJob *job = imapx_match_active_job (is, IMAPX_JOB_FETCH_NEW_MESSAGES | IMAPX_JOB_REFRESH_INFO | IMAPX_JOB_FETCH_MESSAGES, NULL);
+			RefreshInfoData *data = NULL;
+
+			if (job) {
+				data = camel_imapx_job_get_data (job);
+				g_return_val_if_fail (data != NULL, FALSE);
+			}
+
 			/* This is either a refresh_info job, check to see if it is and update
 			 * if so, otherwise it must've been an unsolicited response, so update
 			 * the summary to match */
-
-			if (job && (finfo->got & FETCH_UID)) {
-				RefreshInfoData *data;
+			if (data && data->scan_changes) {
 				struct _refresh_info r;
 
-				data = camel_imapx_job_get_data (job);
-				g_return_val_if_fail (data != NULL, FALSE);
-
 				r.uid = finfo->uid;
 				finfo->uid = NULL;
 				r.server_flags = finfo->flags;
@@ -3712,6 +3714,8 @@ imapx_command_step_fetch_done (CamelIMAPXServer *is,
 	data = camel_imapx_job_get_data (job);
 	g_return_val_if_fail (data != NULL, FALSE);
 
+	data->scan_changes = FALSE;
+
 	ifolder = (CamelIMAPXFolder *) job->folder;
 	isum = (CamelIMAPXSummary *) job->folder->summary;
 
@@ -3973,10 +3977,10 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
 			gchar *uid = (gchar *) l->data;
 
 			camel_folder_change_info_remove_uid (data->changes, uid);
-			camel_folder_summary_remove_uid (s, uid);
 		}
 
 		if (removed != NULL) {
+			camel_folder_summary_remove_uids (s, removed);
 			camel_folder_summary_touch (s);
 
 			g_list_free_full (removed, (GDestroyNotify) g_free);
@@ -4036,7 +4040,6 @@ imapx_job_scan_changes_start (CamelIMAPXJob *job,
 {
 	CamelIMAPXCommand *ic;
 	RefreshInfoData *data;
-	gchar *uid = imapx_get_uid_from_index (job->folder->summary, 0);
 
 	data = camel_imapx_job_get_data (job);
 	g_return_if_fail (data != NULL);
@@ -4048,10 +4051,10 @@ imapx_job_scan_changes_start (CamelIMAPXJob *job,
 		_("Scanning for changed messages in %s"),
 		camel_folder_get_display_name (job->folder));
 
-	e('E', "Scanning from %s in %s\n", uid, camel_folder_get_full_name (job->folder));	
+	e('E', "Scanning full folder %s\n", camel_folder_get_full_name (job->folder));	
 	ic = camel_imapx_command_new (
 		is, "FETCH", job->folder,
-		"UID FETCH %s:* (UID FLAGS)", uid ? uid : "1");
+		"UID FETCH 1:* (UID FLAGS)");
 	camel_imapx_command_set_job (ic, job);
 	ic->complete = imapx_job_scan_changes_done;
 
@@ -4059,7 +4062,6 @@ imapx_job_scan_changes_start (CamelIMAPXJob *job,
 	ic->pri = job->pri;
 	data->infos = g_array_new (0, 0, sizeof (struct _refresh_info));
 	imapx_command_queue (is, ic);
-	g_free (uid);
 }
 
 static gboolean
@@ -4135,6 +4137,8 @@ imapx_command_fetch_new_uids_done (CamelIMAPXServer *is,
 	data = camel_imapx_job_get_data (job);
 	g_return_val_if_fail (data != NULL, FALSE);
 
+	data->scan_changes = FALSE;
+
 	qsort (
 		data->infos->data,
 		data->infos->len,
@@ -4199,6 +4203,8 @@ imapx_job_fetch_new_messages_start (CamelIMAPXJob *job,
 		data->infos = g_array_new (0, 0, sizeof (struct _refresh_info));
 		ic->pri = job->pri;
 
+		data->scan_changes = TRUE;
+
 		if (fetch_order == CAMEL_SORT_DESCENDING)
 			ic->complete = imapx_command_fetch_new_uids_done;
 		else
@@ -4300,6 +4306,8 @@ imapx_job_fetch_messages_start (CamelIMAPXJob *job,
 		data->infos = g_array_new (0, 0, sizeof (struct _refresh_info));
 		ic->pri = job->pri;
 
+		data->scan_changes = TRUE;
+
 		if (fetch_order == CAMEL_SORT_DESCENDING)
 			ic->complete = imapx_command_fetch_new_uids_done;
 		else
