Fixing a bug with setting the icon