Fix ModuleAttributes value will never be saved in some case.