Update detect script
fix indentation