fix session error at server restart