Fix race condition in updateHeatmap()
Merge branch 'master' into public_demo_20130402