Fix memory issue when popping original image.
Merge branch 'hotfix/pop_memory_issue'