Fix HEAP integration