fix critical bug of ConnectionManager