bug fixes, changes in RunModuleFunction by clainatomi