fix plugin restart bug