Revert "fixed index on line 38."

This reverts commit 81cb5974a041fb67652a9849649c426904e44aa6.
Revert "Fixing errors in custom routes containing queries."

This reverts commit 4c0a78ef3df48e4e599b765bf813104f7194092d.