Adjusted for makign termination of the actor work properly.