fix error message
fix more deprecation warnings