Remove unnecessary if from agent show view