Fixing unloading and exceptions