fix bst memory bug .