fix more warnings, replace assert with debug message