bugfix on palette handling. Still WIP.