Fix querying multiple items from ts