Fixes problem with autodelete