Fix potential NPE in RemoteConnection. am: 9c2c583ad7
am: 16a2464291

Change-Id: I09c0719a180c58eb690f2eebffb65aa79d0e9f87