add lazy connection in core.preinit event