Unittests bugfix