Fixed some mem issues that occur with multi-config runs.