fix Issue 10481 - out of memory error
Merge pull request #2323 from 9rnsr/fix10481

[REG2.063] Issue 10481 - out of memory error