Fixed device destructor