Fix potential NPE.
Added ore smelting.