Fix a bug with the random instance id creation