More testing with query handling