Fix null exception when switching from tree to solar panel