fixed a bug that prevented tranches plot from being generated by R script