Bugfix for unit tests