Fixed a bug that plotted wrong granularities sometimes.