Update UnitOfWork.php

Only the fix from pull request #95
Merge pull request #96 from ROMOPAT/patch-1

Update UnitOfWork.php