diff --git a/components/tvplanit/examples/zeosdatastore/project1.lpi b/components/tvplanit/examples/zeosdatastore/project1.lpi
index a181c9854..b89b8c3a3 100644
--- a/components/tvplanit/examples/zeosdatastore/project1.lpi
+++ b/components/tvplanit/examples/zeosdatastore/project1.lpi
@@ -9,7 +9,6 @@
-
diff --git a/components/tvplanit/source/vpzeosds.pas b/components/tvplanit/source/vpzeosds.pas
index e8d275788..8e286c5b3 100644
--- a/components/tvplanit/source/vpzeosds.pas
+++ b/components/tvplanit/source/vpzeosds.pas
@@ -323,7 +323,8 @@ begin
if FConnection <> nil then begin
wasConnected := FConnection.Connected;
Connected := false;
- end;
+ end else
+ wasConnected := false;
FConnection := AValue;
FContactsTable.Connection := FConnection;
FEventsTable.Connection := FConnection;