fix ws bug