fix: out of bound error because of the length of the path array is
larger than the length of the selectors