fix specs and deprecation warnings