query test fixed