Bugfix: memory leak