fixed autoDelete bug