Added an optimization for the memory_pool