MADS: Fix restoring palette after showing picture dialog