fix memory leak
Merge branch 'master' into gh-pages