Fixed a bug during refresh where an icon handler could be left orphan