workaround in destructor