Fix unique identifier generation