fixed palettes bug