heaps more fixes