When no parameters are passed to the query() function, does not crash anymore