Fix: use `detect` instead of `select{}.first`

`select` iterates over each object while `detect` stops on first match and so it does not allocates so many string objects and is faster.