Fix getCurrentInstanceId.