Fix IngreTest and QueryImpl