Fixed a few Btree bugs that were recently introduced