Fixed crash when adding icon.