Fixed bug on improved version of heatmap data insertion