Changed Temporary memory code to use Custom Variables instead.
issue #124