Fix the _on_connection_closed