fixed queries to actually fetch properly