stress test and fix a memory leak