fix bin/detect