Fix URI matching route detection