Fixed last-row reference in DB\Query