fixes to make heatmap works