Fixed bug reading from btree.