fix server restart bug