fix error in test queries