Replace HeapQueue with old implementation