Fix spec deprecation warnings