bugfix: on unload