fix ws close error