Small fix in loop through fixed queries