Fixed crash at unload