fix to plugin restart