Adjusted variable names in InspectionAgent.detach().