fixing apparent typo in detect() method, h/t code4ghana