UnitOfWork destructor fix