Removed redundancy in path matching.