fix #3, add error gen to palette