fixing bug when reloads a page when a color map is applied