bug fixes for new bottom-up tree building code...