Fixed flags not saving for modules