Fix a return value.

Rather than returning the output of a connection replace, return the newly created connection.