fixes to make extract by BTree work