fix some connection errors