Added check for enabled modules.