fix silly crash when reconnecting for a long time