CMS-138 fix incorrect id generated