fix close conection issue