Query test fixed