Added support for auto-size palettes