Fix potential warning on unload