Hopefully have fixed the crashing on logoff with autoinventory