Fixed some unit tests and functionality.

Now we are interested of any existed path not all matches.