fix circular bug in fetch_class_info
fix more error setting