Small bugs were fixed in heatmap construction process