unique id bug fix