Fix specs and deprecation warnings.