fix more problems found with pathlib