fix more warnings with scope