Fixing failng tests. Re #6171