added reconnection stuff if lost connection would be happen during initialization step