fixed array index in query.c test