Updating the WrapActor method with appropriate scoping of isolate.