Set instance id in init