stop plugin on closing