Fix deprecations in specs.