fixed bug in palette parsing