Some small bugfix in tests