Fixed a bug in Heap.swap: the swap buffer had only duplicate values