fix heapsize for NN and DN