Fixed bug when switching colormaps.