Fixed an issue with OnHeap datastructure