fix Routing incorrectly matches documents issue and fix for #63

yes, but there is no inner loop here. I will add comment.