fixed a segmentation fault when generating intensity maps that arised when I fixed dynamic map generation