Fix deprecation in spec.