Fixed a memory leak.
Merge branch 'v0.36'