Fix the deprecation warnings on specs