Fixing failing tests. Related to #3671.