Fixed test run query