Attempt to fix more memory leaks