Some changes to make QueryTabResult functional