do not call getModuleInstanceState multiple times