Fixed a bug in the DynamicPool.