fix color palette = null bug.