fix 4 MB memory leak on every save