added missing check on refresh palette