Fix deprecation in spec