I (think I) fixed Heap exhaustion out-of-memory problems