Fixed crash bug with icon rendering