Fix for bug when connecting ensembles