bug fix: because the resize event is throttled, it was possible that code was executed after the plugin instance was terminated.