Fix deprecated getRemote()

Fix deprecated getRemote()