Fixed a bug in object pool resizing