Bugfix + adapted tests