fix buffer counter bugs in chunkAllocator