fixed server-restart bug