fix ensemble communication deadlocks

Closes #53

makes sure no active ensemble is trying to communicate with a finished ensemble