fix pool termination