fix Routing incorrectly matches documents issue