Fixing a bug in cpool impl