Fixed a few bugs, plotting rank histograms