Removed reference to $this in a closure.