Fix delayed scaleMem() in some scripts