Fix remote connection problems and make sync work again.