Remove table overhead when uri has no query

As suggested by @waywardmonkeys