bugfix: double free