Memory management tweaks in Electric.correlation()