fixed issue with beta of terminal nodes remaining infinite, though in a particularly kludgy way