fixed issue  1819:Datastore reconnect problem, thanks Alan