Connects the final node to the first node.