Fix building heap from array