fix renaming Main in namespace

fix an issue that Main class in namespace (e.g. test.Main) is not renamed