Fixed rename issue when connecting to a server.