Bugfix unit of work