fix route path type check
fix byPath index to work with regular expressions