fix js error when enabling the heatmap overlay after hiding it