Solve the spec 3.0 deprecation issues