fix palettes array count