Minor fix
Fix a bug of memory layout of palette structure