fix more compilation bugs