#6470: Fix bugs, lower estimated memory usage.