fix more warnings of Type cast required