Refine some codes in AbstractPool.