fix infinite keep alive restart bug some more