 + }
 + 
 + - (NSString *)_searchExprForQual:(EOQualifier *)_qualifier {
-+@@ -1093,7 +1110,18 @@
++@@ -1093,7 +1128,18 @@
 +      Eg: UID SORT ( DATE REVERSE SUBJECT ) UTF-8 TODO
 +   */
 +   NSString *tmp;

+ }
+ - (NSDictionary *)sort:(NSArray *)_sortOrderings
+   qualifier:(EOQualifier *)_qual
+@@ -1130,7 +1159,7 @@
+     return nil;
+   }
+   

+   return [self->normer normalizeResponse:[self processCommand:command]];
+ }
+ 
+ - (NSDictionary *)delete:(NSString *)_name {
++  if ([self->selectedFolder isEqualToString:_name]) {
++    [self unselect];
++  }
+   return [self _performCommand:@"delete" onFolder:_name];
+ }
+ - (NSDictionary *)create:(NSString *)_name {
+@@ -820,23 +854,23 @@
+   return [self->normer normalizeResponse:[self processCommand:cmd]];
+ }
+ 
