fix UB