Fix modules' execution loop bug