fix the detects