Fixed Unload error in preferences