Fixed an important bug that prevent close lasts connection until get a new one