fix palette and prevent recursive data structure... (oops)