fix test to read query