Incorrect query result field indices fixed