fix connection to remote