heaps/js fixes