Remove deprecation varnings
Fix build for spec 3.0
Prevent should deprecation varning