stm dump bugfix and heatmap error handling