fixing typo in detect