bugfixed when meet bad client