bug fix. finish() should terminate all processes