Bugfix  Out of Memory Error
(cherry-picked from 9746863)