Added protection for display changing during icon creation.