fix more io bugs