fix memory overhead problem for pybtree