Fixed some minor bugs with the palette class.