Fix to syntax in detect