diff --git a/2.10/Source/Main.pas b/2.10/Source/Main.pas
index 6490a63..da40067 100644
--- a/2.10/Source/Main.pas
+++ b/2.10/Source/Main.pas
@@ -1467,15 +1467,21 @@ begin
FileList[0] := '';
end;
- if pos(' 0 then
- repeat
- FileList.Delete(FileList.Count - 1);
- until (Pos('', FileList[FileList.count - 1]) <> 0)
- else
- repeat
- FileList.Delete(FileList.Count - 1);
- until (Pos('<' + Tag + '>', FileList[FileList.count - 1]) <> 0) or
- (Pos('', FileList[FileList.count - 1]) <> 0);
+ if FileList.Count > 2 then
+ begin
+ if pos(' 0 then
+ repeat
+ FileList.Delete(FileList.Count - 1);
+ until (Pos('', FileList[FileList.count - 1]) <> 0)
+ else
+ repeat
+ FileList.Delete(FileList.Count - 1);
+ until (Pos('<' + Tag + '>', FileList[FileList.count - 1]) <> 0) or
+ (Pos('', FileList[FileList.count - 1]) <> 0);
+ end else
+ begin
+ FileList.Delete(FileList.Count - 1);
+ end;
FileList.Add(Trim(FlameToXML(cp1, false)));
FileList.Add('');