fixed query so it doesn't crash when it misses a download