Fix palette creation