remove a possible overflow condition from heaps