Bug fixes

Fixed heatmap calculation and getvalue to more intuitive values.