Moved the setting of query types inside of execute, so settings don't get preserved between calls.