Add improvement for unique ID handling