Fix bug where iconResources were not being set in some cases on state change