bug in instanceId handling