fix close client bug