Fix compilation error; fix connection update