fixing ref

to buildpalettefromdict