Fixing createPalette