Fix a bug of extension type's const str & refactoring