Fix client ub bug