Fix a compile error
Update spec to new API